package com.tuo51.childcare.domain.vo;

import com.tuo51.childcare.domain.dailytask.DailyTaskTemplate;
import com.tuo51.foudation.model.Domain;
import com.tuo51.foudation.utils.CopyUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 每日观察记录
 */
@Data
public class DailyTaskTemplateVO {
    private String id;

    private Date created = new Date();
    private Integer dailyIndex = 0;
    private String dimensionId;



    private Integer gender = 0;

    private Integer parent = 0;

    private String cover;
    private String title;

    private String description;
    private String rate;

    private String duration;

    private String period;

    private String manual;

    private Integer monthMax = 0;
    private Integer monthMin = 0;

    private Boolean required = false;

    private String ref;

    public static DailyTaskTemplateVO of(DailyTaskTemplate template){
        DailyTaskTemplateVO ret = new DailyTaskTemplateVO();
        CopyUtils.copyProperties(template, ret);
        return ret;
    }

    public static DailyTaskTemplateVO of(int dailyIndex, String cover, String title, String description,
                                         String rate, String duration, String period,
                                         String manual,
                                         String ref){

        DailyTaskTemplateVO ret = new DailyTaskTemplateVO();

        ret.setDailyIndex(dailyIndex);
        ret.setCover(cover);
        ret.setTitle(title);
        ret.setDescription(description);
        ret.setRate(rate);
        ret.setDuration(duration);
        ret.setPeriod(period);
        ret.setManual(manual);
        ret.setRef(ref);

        return ret;
    }

}
